home *** CD-ROM | disk | FTP | other *** search
/ Aminet 25 / Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso / Aminet / dev / amos / AMOS0398.lzh / AMOSLIST / 000138_amos-request@svcs1.digex.net_Fri Mar 13 20:15:42 1998.msg < prev    next >
Text File  |  1998-04-01  |  4KB  |  92 lines

  1. >From amos-request@svcs1.digex.net  Fri Mar 13 20:15:42 1998
  2. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224])
  3.     by pony-1.mail.digex.net (8.8.8/8.8.8) with ESMTP id UAA03550
  4.     for <mcox@access.digex.net>; Fri, 13 Mar 1998 20:15:42 -0500 (EST)
  5. Received: (from daemon@localhost)
  6.     by svcs1.digex.net (8.8.5/8.8.5) id OAA18831
  7.     for amos-out; Fri, 13 Mar 1998 14:37:23 -0500 (EST)
  8. Received: from pony-1.mail.digex.net (pony-1.mail.digex.net [204.91.241.5])
  9.     by svcs1.digex.net (8.8.5/8.8.5) with ESMTP id OAA18828
  10.     for <amos-list@svcs1.digex.net>; Fri, 13 Mar 1998 14:37:22 -0500 (EST)
  11. Received: from mailhost.sosbbs.com (sosbbs.com [204.186.168.100])
  12.     by pony-1.mail.digex.net (8.8.8/8.8.8) with SMTP id OAA12793
  13.     for <amos-list@access.digex.net>; Fri, 13 Mar 1998 14:37:18 -0500 (EST)
  14. Received: from default (204.186.168.60) by mailhost.sosbbs.com
  15.  (EMWAC SMTPRS 0.81) with SMTP id <B0000232884@mailhost.sosbbs.com>;
  16.  Fri, 13 Mar 1998 14:33:23 -0500
  17. Message-ID: <B0000232884@mailhost.sosbbs.com>
  18. From: "Garfield Benjamin" <gbenjam@sosbbs.com>
  19. To: "AMOS MAILING LIST" <amos-list@access.digex.net>
  20. Subject: Re: extension?  Phew!! DIE THREAD DIE!!
  21. Date: Fri, 13 Mar 1998 14:48:51 -0500
  22. X-MSMail-Priority: Normal
  23. X-Priority: 3
  24. X-Mailer: Microsoft Internet Mail 4.70.1155
  25. MIME-Version: 1.0
  26. Content-Type: text/plain; charset=ISO-8859-1
  27. Content-Transfer-Encoding: 7bit
  28. Status: O
  29. X-Status: 
  30.  
  31. >> If AGE<10
  32. >>    Print "You are less than 10 years old."
  33. >> else if AGE=21
  34. >>    Print "Hey!! Now you can drink alcohol in the U.S.!!"
  35. >> else
  36. >>    Print "WOW, you're OVER 21!!"
  37. >> endif
  38. >>   Well, problem is this won't work. 
  39.  
  40.    > Yes it will. I tried it.
  41.  
  42.       Very strange as I just tried it as well and AMOS gives an error
  43.       (missing End If) just as I suspected!!  The only thing I can 
  44.       assume is that you and Keith are using AMOS Pro which must
  45.       have changed things a bit.  In AMOS v1.36 it will NOT work.
  46.  
  47.  
  48. > The logic is the same too. Select..is just
  49. > more advanced in that it offers some extra features.
  50.  
  51.    The logic is NOT the same.  Look at the above code again.  This
  52.    will print "WOW, you're over 21!!" as long as AGE is greater than
  53.    9 and unequal to 21... 
  54.  
  55.  
  56. >>If AGE<10
  57. >>   Print "You are less than 10 years old."
  58. >>Else If AGE=21
  59. >>      Print"Hey!! Now you can drink alcohol in the U.S.!!"
  60. >>   Else If AGE>21
  61. >>         Print "WOW, you'r OVER 21!!"
  62. >>      End If
  63. >>   End If
  64. >>End If
  65.  
  66.    > That would trigger the error-system. One if and three end-ifs is
  67.    > plain wrong.
  68.  
  69.       Try it... it works fine. Look at the source, there ARE three Ifs.
  70.       It's the only way you can do it in AMOS v1.36 to use the style
  71.       you suggested.
  72.  
  73.  
  74. > That being said, this might be a bit clearer (arguably the "best"
  75. > method for AMOS) but it still lacks when compared to the
  76. > Select...Case style.  Anyway, the point is you are still looking at
  77. > the same two basic methods, the If...End If and the If...Else...EndIf
  78.  
  79.    > Yes but does it really matter? The result is what is importand
  80.    > and the if... else if... else end if... structure is quite close to
  81.    > the select.. syntax.
  82.  
  83.       Of course not.  Actually, I don't even know what we're debating
  84.       here!!  I was simply responding to the VB-guy's post about
  85.       Select...Case.  In the end, it doesn't matter to me: I'll use If...
  86.       EndIf, If...Else...EndIf, as it's six one way and half a dozen the
  87.       other, but the whole point of this thread was that it might be
  88.       nice to have support for SELECT...CASE in AMOS.  :-)
  89.  
  90.  
  91.                 Garfield Benjamin    e-mail:gbenjam@sosbbs.com
  92.         Website( http://www.sosbbs.com/~gbenjam ): 50% Complete